from applications.extensions import ma
from marshmallow import fields


class BookOutSchema(ma.Schema):
    id = fields.Integer()
    parent_id = fields.Integer(default=0)
    name = fields.Str()
    img = fields.Str()
    desc = fields.Str()
    tid = fields.Integer()
    tag = fields.Str()
    covers = fields.Str()
    sheets = fields.Integer()
    papers = fields.Integer()
    auth = fields.Str()
    dynasty = fields.Str()
    year = fields.Str()
    status = fields.Integer()
    sort = fields.Integer()
    uid = fields.Integer()
    views = fields.Integer()
    notes = fields.Integer()
    favs = fields.Integer()
    changed = fields.Integer()
    update_time = fields.DateTime()
    create_time = fields.DateTime()
